#include <stdio.h>

int main(int argc, char** argv) {
    int var = 1;

    int* int_ptr = NULL;  //使指针置空
    int_ptr = &var;

    char* char_ptr = NULL;
    char_ptr = (char*)&var;
    printf("Before arithmetic: int_ptr: %u, char_ptr: %u\n",
           (unsigned int)int_ptr, (unsigned int)char_ptr);

    int_ptr++;           //算术步长通常为4字节
    char_ptr++;          //算术步长是1字节

    printf("After arithmetic: int_ptr: %u, char_ptr: %u\n",
           (unsigned int)int_ptr, (unsigned int)char_ptr);

    return 0;
}